import { API_HOST_10443, API_HOST_1 } from 'config'
import request from 'request'

export default {


  lotteryWinners(data = {}) {
    return request({
      url: API_HOST_1 + "/daikin/lottery/winners",
      data: data,
      method: "GET",
      header: { 'content-type': 'application/x-www-form-urlencoded' },
      showLoading: true,
      showErrToast: true
    });
  },

  participantIn(data = {}) {
    return request({
      url: API_HOST_1 + "daikin/lottery/participantIn",
      data: data,
      method: "POST",
      header: { 'content-type': 'application/x-www-form-urlencoded' },
      showLoading: true,
      showErrToast: true
    });
  },

  addRowCoupons(data = {}){
    return request({
      url: API_HOST_10443 + "wx/coupon/getRowCouponsOrder",
      data: data,
      method: "POST",
      header: { 'content-type': 'application/x-www-form-urlencoded' },
      showLoading: true,
      showErrToast: true
    });
  },

  getStatus(data = {}){
    return request({
      url: API_HOST_10443 + "wx/user/getStatus",
      data: data,
      method: "GET",
      showLoading: false,
      showErrToast: false
    });
  },

  getUserRelationShopFromAPI(data = {}) {
    return request({
      url: API_HOST_1 + "daikin/userRelation/distributor",
      data: data,
      header: { 'content-type': 'application/x-www-form-urlencoded' },
      method: "GET",
      showLoading: true,
      showErrToast: true
    });
  },

  addUserVisitPage(data = {}) {
    return request({
      url: API_HOST_10443 + "wx/user/addPageVisit",
      data: data,
      method: "POST",
      showLoading: false,
      showErrToast: false
    });
  },

  saveUserHouseImages(data = {}){
    return request({
      url: API_HOST_1 + "daikin/house-plan/adds",
      data: data,
      method: "POST",
      showLoading: true,
      showErrToast: true
    });
  },

  updateUserHouseImages(data = {}) {
    return request({
      url: API_HOST_1 + "daikin/house-plan/modifys",
      data: data,
      method: "POST",
      showLoading: true,
      showErrToast: true
    });
  },

  getUserHouseImage(data = {}) {
    return request({
      url: API_HOST_1 + "daikin/house-plan/house",
      data: data,
      method: "GET",
      showLoading: true,
      showErrToast: true
    });
  },

  getUserHouseImageList(data = {}) {
    return request({
      url: API_HOST_1 + "daikin/house-plan/user/list",
      data: data,
      method: "GET",
      showLoading: true,
      showErrToast: true
    });
  },

  delUserHouseImage(data = {}) {
    return request({
      url: API_HOST_1 + "daikin/house-plan/delete",
      data: data,
      method: "POST",
      header: { 'content-type': 'application/x-www-form-urlencoded' },
      showLoading: true,
      showErrToast: true
    });
  },

  getUserProposal(data = {}) {
    return request({
      url: API_HOST_1 + "daikin/proposal/getUserProposal",
      data: data,
      method: "GET",
      showLoading: true,
      showErrToast: true
    });
  },

  getProposalDetail(data = {}) {
    return request({
      url: API_HOST_1 + "daikin/proposal/get",
      data: data,
      method: "GET",
      showLoading: true,
      showErrToast: true
    });
  },

  withMeProposal(data = {}) {
    return request({
      url: API_HOST_1 + "daikin/proposal/withMeHome",
      data: data,
      method: "POST",
      header: { 'content-type': 'application/x-www-form-urlencoded' },
      showLoading: true,
      showErrToast: true
    });
  },

  goOut(data = {}) {
    return request({
      url: API_HOST_1 + "daikin/proposal/getOutOfMyHouse",
      data: data,
      method: "POST",
      header: { 'content-type': 'application/x-www-form-urlencoded' },
      showLoading: true,
      showErrToast: true
    });
  },

  gotoMarsProposal(data = {}) {
    return request({
      url: API_HOST_1 + "/daikin/proposal/gotoMars",
      data: data,
      method: "POST",
      header: { 'content-type': 'application/x-www-form-urlencoded' },
      showLoading: true,
      showErrToast: true
    });
  },


}